
//连接mongoDB
var mongoose = require('mongoose');
var dbURI = 'mongodb://localhost:27017/ParkingSystem';//项目需要连接的mongoDB数据库地址
mongoose.connect(dbURI, { useNewUrlParser: true, useUnifiedTopology: true });
//当项目与数据库连接成功时触发下列事件
mongoose.connection.on('connected', function () {
    console.log(dbURI + '数据库连接成功');
})
